<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::view('view1', 'view1');

Route::view('view2', 'view2',['name'=>'视图路由2']);

Route::get('admin', 'AdminController@index');
Route::get('users', 'UsersController@index');

Route::group(['prefix'=>'products','namespace'=>'Products'],function(){
	Route::get('index','ProductsController@index');
	Route::get('add','ProductsController@add');
	Route::get('edit','ProductsController@edit');
	Route::get('delete','ProductsController@delete');
});
Route::group(['prefix'=>'records','namespace'=>'Records'],function(){
	Route::get('index','RecordsController@index');
	Route::get('add','RecordsController@add');
	Route::get('edit','RecordsController@edit');
	Route::get('delete','RecordsController@delete');
});

// Route::get('/', function () {
//     return view('welcome');
// });